package fr.generali.sas.extras.transaction;


import static fr.generali.sas.extras.transaction.TransactionIndicatingUtil.getTransactionStatus;

import org.apache.log4j.spi.Filter;
import org.apache.log4j.spi.LoggingEvent;

public class TransactionIndicatingFilter extends Filter {
	@Override
	public int decide(LoggingEvent loggingEvent) {
		loggingEvent.setProperty("xaName", getTransactionStatus(true));
		loggingEvent.setProperty("xaStatus", getTransactionStatus(false));
		return Filter.NEUTRAL;
	}
}
